<form autocomplete="off" class="layui-form layui-box modal-form-box" action="{:request()->url()}" data-auto="true" method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">所属版块：</label>
        <div class="layui-input-block">
            <select name='pid' class='layui-select full-width block'>
                <!--{foreach cates as $cate}-->
                <!--{eq name='cate.id' value='$vo.pid|default=0'}-->
                <option selected {if isset($cate.status)&&$cate.status==2}disabled{/if} value='{$cate.id}'>{$cate.spl|raw}{$cate.name|default=''}</option>
                <!--{else}-->
                <option value='{$cate.id}' {if isset($cate.status)&&$cate.status==2}disabled{/if}>{$cate.spl|raw}{$cate.name}</option>
                <!--{/eq}-->
                <!--{/foreach}-->
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">名称（标题）：</label>
        <div class="layui-input-block">
            <input autofocus name="name" value='{$vo.name|default=""}' required title="请输入" placeholder="请输入" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">英文标题：</label>
        <div class="layui-input-block">
            <input autofocus name="english_name" value='{$vo.english_name|default=""}' title="请输入" placeholder="请输入" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">
            logo：<br><span class="nowrap color-desc"></span>
        </label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:120px;max-width:120px" src="{$vo.logo ?: '__STATIC__/theme/img/image.png'}"/>
            <input type="hidden" name="logo" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.logo ?: ''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-uptype="local" data-width="" data-height="" data-type="png,jpg,jpeg" data-field="logo">上传图片</a>
            <p class="help-block">顶级栏目请上传logo,上传尺寸88*88</p>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">版块描述：</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入版块描述" title="请输入版块描述" class="layui-textarea" name="desc">{$vo.desc|default=""}</textarea>
        </div>
    </div>
    {if isset($vo['id'])}
    <input type='hidden' value='{$vo.id}' name='id'/>
    {else}
    <input type="hidden" value="{:date('Y-m-d H:i:s')}" name="create_at">
    {/if}

    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
    </div>
</form>
